python,python3: remove multi-arch support, and /usr/local paths
authorAlexandru Ardelean <[email protected]>
Sun, 16 Jul 2017 20:31:37 +0000 (23:31 +0300)
committerAlexandru Ardelean <[email protected]>
Wed, 19 Jul 2017 13:50:25 +0000 (16:50 +0300)
This should hopefully reduce weird behaviour caused
by the host system.

Signed-off-by: Alexandru Ardelean <[email protected]>
lang/python/python/Makefile
lang/python/python/patches/006-remove-debian-multiarch-support.patch [deleted file]
lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch [new file with mode: 0644]
lang/python/python3/Makefile
lang/python/python3/patches/006-remove-debian-multiarch-support.patch [deleted file]
lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch [new file with mode: 0644]

index 09269caebaddc2e0fb1c41ffd93affc1f6593862..60e7fe19cbafa89c65e4b5a88b4b2e4da4dce07a 100644 (file)
@@ -12,7 +12,7 @@ include ./files/python-version.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
diff --git a/lang/python/python/patches/006-remove-debian-multiarch-support.patch b/lang/python/python/patches/006-remove-debian-multiarch-support.patch
deleted file mode 100644 (file)
index 01aa924..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 1d1ae72..511aed5 100644
---- a/setup.py
-+++ b/setup.py
-@@ -444,7 +444,8 @@ class PyBuildExt(build_ext):
-             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         if cross_compiling:
-             self.add_gcc_paths()
--        self.add_multiarch_paths()
-+        else:
-+            self.add_multiarch_paths()
-         # Add paths specified in the environment variables LDFLAGS and
-         # CPPFLAGS for header and library files.
diff --git a/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch b/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch
new file mode 100644 (file)
index 0000000..1ecc153
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/setup.py b/setup.py
+index 54054c2..d043761 100644
+--- a/setup.py
++++ b/setup.py
+@@ -454,13 +454,8 @@ class PyBuildExt(build_ext):
+             os.unlink(tmpfile)
+     def detect_modules(self):
+-        # Ensure that /usr/local is always used
+-        if not cross_compiling:
+-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+         if cross_compiling:
+             self.add_gcc_paths()
+-        self.add_multiarch_paths()
+         # Add paths specified in the environment variables LDFLAGS and
+         # CPPFLAGS for header and library files.
index 02c1031932c186a4e68bef9e4657741222a8ad6d..98e32b16e861ebff2714c5923de7f21d6eb3f8e6 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
diff --git a/lang/python/python3/patches/006-remove-debian-multiarch-support.patch b/lang/python/python3/patches/006-remove-debian-multiarch-support.patch
deleted file mode 100644 (file)
index 52d52b9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 7868b7b..9ae0ef2 100644
---- a/setup.py
-+++ b/setup.py
-@@ -444,7 +444,6 @@ class PyBuildExt(build_ext):
-             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         if cross_compiling:
-             self.add_gcc_paths()
--        self.add_multiarch_paths()
-         # Add paths specified in the environment variables LDFLAGS and
-         # CPPFLAGS for header and library files.
diff --git a/lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch b/lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch
new file mode 100644 (file)
index 0000000..ed2fdb5
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/setup.py b/setup.py
+index f04bf22..01b851e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -487,16 +487,9 @@ class PyBuildExt(build_ext):
+             return ['m']
+     def detect_modules(self):
+-        # Ensure that /usr/local is always used, but the local build
+-        # directories (i.e. '.' and 'Include') must be first.  See issue
+-        # 10520.
+-        if not cross_compiling:
+-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+         # only change this for cross builds for 3.3, issues on Mageia
+         if cross_compiling:
+             self.add_gcc_paths()
+-        self.add_multiarch_paths()
+         # Add paths specified in the environment variables LDFLAGS and
+         # CPPFLAGS for header and library files.